My meme

This meme depicts a comparison of a loaf of bread to a cat loafing and highlights the superiority of the cat loaf, ( hence the heart after the word ‘loaf’ ) which was inspired by my pet cat

library(magick)

# base and text
normal_text <- image_blank(width = 300, height = 300, color = "#ffcccc") %>%
  image_annotate(text = "Loaf",
                 color = "#ffffff",
                 size = 40,
                 font = "sans",
                 gravity = "center")

cursive_text <- image_blank(width = 300, height = 300, color = "#ffcccc") %>%
  image_annotate(text = "Loaf <3",
                 color = "#ffffff",
                 size = 40,
                 font = "sans",
                 gravity = "center") 



# images 
cat <- image_read("https://ipetcompanion.com/wp-content/uploads/2021/12/Cat-Loafing.jpg") %>%
  image_scale(300)

bread <- image_read("https://www.thespruceeats.com/thmb/vbc6MqkqHlkSOx_X5Clyo5qv0kk=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/loaf-of-bread-182835505-58a7008c5f9b58a3c91c9a14.jpg") %>%
  image_scale(300)


# combine
first_row <- c(bread, normal_text) %>%
  image_append()

second_row <- c(cat, cursive_text) %>%
  image_append()

meme <- c(first_row, second_row) %>%
  image_append(stack = TRUE)

image_write(meme, "my_meme.png")

My animated GIF

This GIF depicts the different times of a day and I tried to approach it in a way so that it looked almost like a story line rather than a comedic GIF

library(magick)

# vector for the counts
counts <- 1:4 %>% as.character()

# images
morning <- image_read("https://i.postimg.cc/kXyH0FVR/Screen-Shot-2023-03-11-at-8-51-02-PM.png") %>%
  image_scale(500)

noon <- image_read("https://i.postimg.cc/GtxM1dpn/Screen-Shot-2023-03-11-at-8-51-14-PM.png") %>%
  image_scale(500)

evening <- image_read("https://i.postimg.cc/9M31RrRj/Screen-Shot-2023-03-11-at-8-51-22-PM.png") %>%
  image_scale(500)

night <- image_read("https://i.postimg.cc/J00yRQr7/Screen-Shot-2023-03-11-at-8-51-29-PM.png") %>%
  image_scale(500)

# frames
frame1 <- morning %>%
  image_annotate(text = "7am", size = 50, gravity = "northwest")

frame2 <- noon %>%
  image_annotate(text = "12pm", size = 50, gravity = "northeast")

frame3 <- evening %>%
  image_annotate(text = "6pm", size = 50, gravity = "southeast")

frame4 <- night %>%
  image_annotate(text = "10pm", size = 50, gravity = "southwest")

# ordering the frames with a vector
frames <- c(frame1, frame2, frame3, frame4)

# animating frames
animation <- image_morph(frames) %>%
  image_animate(fps = 1)

image_write(animation, "my_animation.gif")
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300&family=Single+Day&display=swap');
body {
 font-family: 'Single Day', cursive;
 color: #000000;
 background-color: #C5D4EB;
}